<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib  uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>查询离职员工列表</title>

    <!-- Bootstrap -->
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">


  </head>
  <body>
<!-- 导航 -->
    <nav class="navbar navbar-default ">
      <div class="container">
        <!-- 小屏幕按钮和logo -->
        <div class="navbar-header">
          <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="#" class="navbar-brand">RM admin</a>
        </div>
        <!-- 小屏幕按钮和logo -->
        <!-- 导航 -->
        <div class="collapse navbar-collapse">
           <ul class=" nav navbar-nav ">
             <li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span> &nbsp;后台首页</a></li>
             <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    组织结构管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/organization/department">部门管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/organization/job">岗位管理</a></li>

                </ul>
            </li>
            <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    人事信息管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/employee/enterAddEmployee">员工入职管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/period/enterPeriod/">试用期管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/dept/out">部门调动管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/post/out">岗位调动管理</a></li>
                    <li><a href="${pageContext.request.contextPath }/leave/out">员工离职管理</a></li>

                </ul>
            </li>
             <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    员工信息中心
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/infoemployee/list">员工信息中心</a></li>


                </ul>
            </li>
            <li class="dropdown">
                <a href="organization.html" class="dropdown-toggle" data-toggle="dropdown">
                    报表管理
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath }/statement/newHire">新聘员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/departure">离职员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/deptTurn">部门调动员工报表</a></li>
                    <li><a href="${pageContext.request.contextPath }/statement/postTurn">岗位调动员工报表</a></li>
                </ul>
            </li>
           </ul>
           <ul class=" nav navbar-nav navbar-right ">
             <li class="dropdown">
                <a href="#" class=" dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">admin
                    <span class="caret"></span>
                </a>
            </li>

             <li><a href="http://localhost:8080/PMsystem/admin/exit"><span class="glyphicon glyphicon-off"></span>&nbsp;退出</a></li>
           </ul>
        </div>
        <!-- 导航 -->
      </div>
    </nav>
   <!-- 导航 -->
   <div class="container-fluid">
       <div class="row">
           <div class="col-md-2">
               <div class="panel-group" id="accordion">
                   <div class="panel panel-default">
                      <div class="panel-heading">
                          <h4 class="panel-title">
                              <a data-toggle="collapse" data-parent="#accordion"
                              href="#collapseThree" style="text-decoration: none;">
                            查询员工列表
                              </a>
                          </h4>
                      </div>
                      <div id="collapseThree" class="panel-collapse collapse in">
                          <div class="panel-body">
                              <table class="table table-hover">
                              <tbody>
                                <tr>
                                  <td style="border:none;"><a href="${pageContext.request.contextPath }/leave/out"" style="text-decoration: none;">员工离职</a></td>
                                </tr>


                              </tbody>
                            </table>
                          </div>
                      </div>
                  </div>



                  <div class="panel panel-default">
                      <div class="panel-heading">
                          <h4 class="panel-title">
                              <a data-toggle="collapse" data-parent="#accordion"
                              href="#collapseThreeo" style="text-decoration: none;">
                           已离职岗位员工查询
                              </a>
                          </h4>
                      </div>
                      <div id="collapseThreeo" class="panel-collapse collapse in">
                          <div class="panel-body">
                              <table class="table table-hover">
                              <tbody>
                                <tr>
                                  <td style="border:none;"><a href="${pageContext.request.contextPath }/leave/leaveQuery" style="text-decoration: none;" >已离职员工查询</a></td>
                                </tr>
                              </tbody>
                            </table>
                          </div>
                      </div>
                  </div>
              </div>
           </div>
           <div class="col-sm-10">
          <div class="container">
           <!-- 主体内容 -->
           <div class="panel panel-info">
              <div class="panel-heading">
                  <h3 class="panel-title">查询员工</h3>
              </div>
              <div class="panel-body">
                  <form class="form-inline" role="form" action="${pageContext.request.contextPath }/leave/leaveQuery">
                    <div class="row">
                      <div class="col-md-4">
                          <div class="input-group">
                             <span class="input-group-addon">员工编号</span>
                             <input type="text" class="form-control" placeholder="请输入员工编号" name="lId">
                         </div><br/><br/>
                         <div class="input-group">
                             <span class="input-group-addon">员工岗位</span>
                             <select class="form-control" style="width: 200px;" name="lPost">
                             	<option value=""></option>
                        <c:forEach items="${post}" var="post">
                        	<option value="${post.postName }">${post.postName }</option>
                        </c:forEach>
                      
                      </select>
                         </div><br/><br/>

                      </div>

                      <div class="col-md-4">
                            <div class="input-group">
                                <span class="input-group-addon">员工姓名</span>
                                <input type="text" class="form-control" placeholder="请输入员工姓名" name="lName">
                            </div><br/><br/>
                                                     <div class="input-group">
                              <span class="input-group-addon">开始日期</span>
                              <input type="date" class="form-control" placeholder="请输入开始日期" name="sDate" value="2018-01-01">
                          </div><br/><br/>

                            
                           
                      </div>
 					
                      <div class="col-md-4">
                          <div class="input-group">
                             <span class="input-group-addon">部门名称</span>
                             <select class="form-control" style="width: 200px;" name="lDept">
                             <option value=""></option>
                        <c:forEach items="${department}" var="department">
                        	<option value="${department.deptName }">${department.deptName }</option>
                        </c:forEach>
                      
                      </select>
                         </div><br/><br/>
                          <div class="input-group">
                              <span class="input-group-addon">结束日期</span>
                              <input type="date" class="form-control" placeholder="请输入结束日期" name="eDate" value="2019-01-08">
                          </div><br/><br/>
                      </div>
                    </div>
                    <div class="row">
                      <div class="input-group ">
                        <button type="submit" class="btn btn-primary">查询</button>
                      </div><br/><br/>
                    </div>
						<input type="hidden" name="lType" value="">
                  </form>
              </div>
          </div>
        </div>

        <div class="container">
       <div class="panel panel-success">
              <div class="panel-heading">
                  <h3 class="panel-title">员工列表</h3>
              </div>
              <div class="panel-body">
                    <table class="table table-hover">

                        <thead>
                          <tr>
						    <th>编号</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>岗位</th>
							<th>部门编号</th>
							<th>部门名称</th>
							<th>离职类型</th>
							<th>离职日期</th>
							<th>离职去向</th>

                          </tr>
                        </thead>
                        <tbody>
                          <c:forEach items="${leaveEmployee }" var="leaveEmployee">
                          <tr>
							   <td>${leaveEmployee.elEmp.empId }</td>
							   <td>${leaveEmployee.elEmp.empName }</td>
							   <td>${leaveEmployee.elEmp.empSex }</td>
							   <td>${leaveEmployee.elPost.postName }</td>
							   <td>${leaveEmployee.elDept.deptId }</td>
							   <td>${leaveEmployee.elDept.deptName }</td>
							   <td>${leaveEmployee.elType }</td>
							   <td>${leaveEmployee.elDate }</td>
							   <td>${leaveEmployee.elAway }</td> 
						   </tr>
						   </c:forEach>
                            
						   </tbody>
					</table>
              </div>
	   </div>
   </div>

   <!-- 模态框（Modal） -->
   <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
       <div class="modal-dialog">
           <div class="modal-content">
               <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                   <h4 class="modal-title" id="myModalLabel">备注信息</h4>
               </div>
               <div class="modal-body">
                 <div >
                   <textarea class="form-control"></textarea>
                 </div>
               </div>
               <div class="modal-footer">
                   <button type="reset" class="btn btn-default" data-dismiss="modal">关闭</button>
               </div>
           </div><!-- /.modal-content -->
       </div><!-- /.modal -->
   </div>





    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="<%=basePath%>js/jquery-3.2.1.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<%=basePath%>js/bootstrap.min.js"></script>
  </body>
</html>
